/*
 * $Id: comparams.h,v 1.3 2008/11/27 13:46:29 vfrolov Exp $
 *
 * Copyright (c) 2008 Vyacheslav Frolov
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *
 * $Log: comparams.h,v $
 * Revision 1.3  2008/11/27 13:46:29  vfrolov
 * Added --write-limit option
 *
 * Revision 1.2  2008/10/06 12:15:14  vfrolov
 * Added --reconnect option
 *
 * Revision 1.1  2008/03/27 17:17:56  vfrolov
 * Initial revision
 *
 */

#ifndef _COMPARAMS_H
#define _COMPARAMS_H

///////////////////////////////////////////////////////////////
class ComParams
{
  public:
    ComParams();
    ~ComParams();

    void SetIF(const char *_pIF);
    const char *GetIF() const { return pIF; }

    void SetReconnectTime(int _reconnectTime) { reconnectTime = _reconnectTime; }
    int GetReconnectTime() const { return reconnectTime; }

    BOOL SetWriteQueueLimit(const char *pWriteQueueLimit);
    static string WriteQueueLimitStr(long writeQueueLimit);
    string WriteQueueLimitStr() const { return WriteQueueLimitStr(writeQueueLimit); }
    static const char *WriteQueueLimitLst();
    long WriteQueueLimit() const { return writeQueueLimit; }

    enum {
      rtDefault = -1,
      rtDisable = -2,
    };

  private:
    char *pIF;
    int reconnectTime;
    long writeQueueLimit;
};
///////////////////////////////////////////////////////////////

#endif  // _COMPARAMS_H
